from django.db import models
from datetime import datetime


class Contact(models.Model):
    """
    联系表单
    """
    customer_name = models.CharField(max_length=30, default= '', verbose_name="商户姓名")
    address = models.CharField(max_length=40, default= '', verbose_name="地址")
    your_name = models.CharField(max_length=20, default= '', verbose_name="您的姓名")
    mobile = models.CharField(null=True, blank=True, max_length=11, verbose_name="联络电话", help_text="联络电话")
    add_time = models.DateTimeField(default=datetime.now, verbose_name="添加时间")

    class Meta:
        verbose_name = '联系'
        verbose_name_plural = '联系'

    def __str__(self):
        return self.customer_name
